package week03;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.FullHttpResponse;

/**
 * @author edward
 * @since 2021-07-11
 */
public class TagHttpFilter implements HttpFilter {
    @Override
    public void inboundFilter(FullHttpRequest request, ChannelHandlerContext ctx) {
        request.headers().add("GWTAG", "Netty-Request");
    }

    @Override
    public void outboundFilter(FullHttpResponse response, ChannelHandlerContext ctx) {
        response.headers().add("GWTAG", "Netty-Response");
    }
}
